package com.lovenote.common.pojo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 笔记实体对象
 * @author xingkong1221
 *
 */
@Entity
@Table(name = "common_note")
public class Note implements Serializable {
	
	private static final long serialVersionUID = 7086286636369197482L;

	@Id
	@Column(name = "id", nullable = false, length = 10)
	@GenericGenerator(name = "generator", strategy = "increment")
	@GeneratedValue(generator = "generator")
	private long id;

	@Column(name = "catalog_id", nullable = false, length = 5)
	private int catalogId;

	@Column(name = "user_id", nullable = false, length = 10)
	private long userId;

	@Column(name = "author", nullable = false, length = 20)
	private String author;

	@Column(name = "content", nullable = false, length = 600)
	private String content;

	@Column(name = "tags", nullable = false, length = 255)
	private String tags;
	
	@Column(name = "comment_number", nullable = false, length = 8)
	private int commentNumber;

	@Column(name = "view_number", nullable = false, length = 8)
	private int viewNumber;

	@Column(name = "update_time", nullable = true)
	private Date updateTime;

	@Column(name = "dateline", nullable = true)
	private Date dateline;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public int getCatalogId() {
		return catalogId;
	}

	public void setCatalogId(int catalogId) {
		this.catalogId = catalogId;
	}

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getTags() {
		return tags;
	}

	public void setTags(String tags) {
		this.tags = tags;
	}

	public int getCommentNumber() {
		return commentNumber;
	}

	public void setCommentNumber(int commentNumber) {
		this.commentNumber = commentNumber;
	}

	public int getViewNumber() {
		return viewNumber;
	}

	public void setViewNumber(int viewNumber) {
		this.viewNumber = viewNumber;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Date getDateline() {
		return dateline;
	}

	public void setDateline(Date dateline) {
		this.dateline = dateline;
	}
	
}
